
const captureItem = 'astralsorcery:knowledge_share'

onEvent('item.entity_interact', event => {
    if (event.item.id === captureItem && (event.target.type ==  "atum:villager_male" || event.target.type == "atum:villager_female")) { //末影龙除外，你可以添加其他禁止实体
        event.server.players.runCommandSilent(`summon minecraft:villager ${event.target.x} ${event.target.y} ${event.target.z}`)
        event.target.y = -400
        event.target.health = 1 

        event.item.count --
    }
})